home *** CD-ROM | disk | FTP | other *** search
- # CVS $Id: optmenu3.tcl,v 1.3 1995/02/03 16:55:09 zibi Exp $
-
- #
- # Test program for dynamic option menus using routines in tools.tcl
- #
- global mediaMenu densityMenu
-
- proc quitCB {cbs} {
- VtClose
- exit 0
- }
-
-
- proc mediaCB {cbs} {
- global mediaMenu densityMenu
-
- set selection [VxOptionMenuGetSelected $mediaMenu]
-
- if {$selection == "floppy"} {
- VxOptionMenuReplaceOptions $densityMenu [list 1440K 720K 100K] 1440K
- }
-
- if {$selection == "tape"} {
- VxOptionMenuReplaceOptions $densityMenu [list 600MB 1000MB] 600MB
- }
-
- if {$selection == "hardDisk"} {
- VxOptionMenuReplaceOptions $densityMenu [list 10MB 20MB 30MB 40MB] 10MB
- }
- }
-
-
-
- #
- # Start Program
- #
-
- set app [VtOpen optionMenu]
-
- set fn [VtFormDialog $app.form -title "Option Menus"]
-
- set mediaMenu \
- [VxOptionMenu $fn.mediaMenu Media: {floppy tape hardDisk} mediaCB tape]
-
- set densityMenu \
- [VxOptionMenu $fn.densityMenu Density: {} "" ""]
-
- mediaCB {}
-
- set quit [VtPushButton $fn.quit -callback quitCB \
- -leftSide FORM \
- -rightSide FORM \
- -bottomSide FORM]
-
- VtShow $fn
- VtMainLoop
-
-
-